<?php
class Chain extends CI_Controller {
	public function __construct() {
		parent::__construct ();
		$this->load->model ( 'MChain' );
		// $this->output->enable_profiler(TRUE);
	}
	function index() {
		$data ['option_country'] = $this->MChain->getcountry ();
		$this->load->view ( 'index', $data );
	}
	function select_province($id = "") {
		$data ['option_province'] = $this->MChain->getprovince ( $id );
		$this->load->view ( 'selectprovince', $data );
	}
	function select_district($id = "") {
		$data ['option_province'] = $this->MChain->district_test ( $id );
		$this->load->view ( 'select_district', $data );
	}
	function select_country() {
		$data ['option_country'] = $this->MChain->province_test ();
		$this->load->view ( 'selectcountry', $data );
	}
	function submit() {
		echo "Country ID = " . $this->input->post ( "country_id" );
		echo "
";
		echo "Province ID = " . $this->input->post ( "province_id" );
		echo "
";
	}
}
?>